import {CloseCircleOutlined, ExclamationCircleOutlined, HddOutlined} from '@ant-design/icons';
import {
  Button,
  Card,
  Checkbox,
  Col,
  DatePicker,
  Divider,
  Form,
  Input,
  InputNumber,
  Modal,
  Popover,
  Radio,
  Row,
  Select,
  Steps,
  Table,
  Tag, Tooltip,
  Transfer
} from 'antd';
import React, {useEffect, useState} from 'react';
import difference from 'lodash/difference';
import {FooterToolbar} from '@ant-design/pro-layout';
import styles from './style.less';
import PickList from "@/pages/product/product-manage/components/PickList";
import PlusOutlined from "@ant-design/icons/lib/icons/PlusOutlined";
import MinusOutlined from "@ant-design/icons/lib/icons/MinusOutlined";
import moment from "moment";

// Customize Table Transfer
const TableTransfer = ({leftColumns, rightColumns, ...restProps}) => (
  <Transfer {...restProps} showSelectAll={false}>
    {({
        direction,
        filteredItems,
        onItemSelectAll,
        onItemSelect,
        selectedKeys: listSelectedKeys,
        disabled: listDisabled,
      }) => {
      const columns = direction === 'left' ? leftColumns : rightColumns;

      const rowSelection = {
        onSelectAll(selected, selectedRows) {
          const treeSelectedKeys = selectedRows
            .map(({processId}) => processId);
          const diffKeys = selected
            ? difference(treeSelectedKeys, listSelectedKeys)
            : difference(listSelectedKeys, treeSelectedKeys);
          onItemSelectAll(diffKeys, selected);
        },
        onSelect({processId}, selected) {
          onItemSelect(processId, selected);
        },
        selectedRowKeys: listSelectedKeys,
      };

      return (
        <Table
          rowKey={'processId'}
          rowSelection={rowSelection}
          columns={columns}
          pagination={false}
          dataSource={filteredItems}
          size="small"
          style={{pointerEvents: listDisabled ? 'none' : null}}
          onRow={(record, index) => ({
            onClick: () => {
              // if (itemDisabled || listDisabled) return;
              onItemSelect(record.processId, !listSelectedKeys.includes(record.processId));
            },
          })}
        />
      );
    }}
  </Transfer>
);

const mockData = [
  {
    processId: 'PRO0001',
    processName: '开料',
    processType: '主工艺',
  },
  {
    processName: '图形电镀',
    processType: '主工艺',
    processId: 'PRO0002',
  },
  {
    processName: '喷锡',
    processType: '主工艺',
    processId: 'PRO0003',
  },
  {
    processName: '成形',
    processType: '主工艺',
    processId: 'PRO0004',
  },
  {
    processName: '测试',
    processType: '主工艺',
    processId: 'PRO0005',
  },
  {
    processName: 'FQC',
    processType: '主工艺',
    processId: 'PRO0006',
  },
  {
    processName: '检测',
    processType: '检测工艺',
    processId: 'PRO0007',
  },
  {
    processName: '入库',
    processType: '其他',
    processId: 'PRO0008',
  },
  {
    processName: '内层线路',
    processType: '主工艺',
    processId: 'PRO0009',
  },
  {
    processName: '内层检验',
    processType: '检测工艺',
    processId: 'PRO0010',
  },
  {
    processName: '层压',
    processType: '其他',
    processId: 'PRO0011',
  },
  {
    processName: '沉铜板电',
    processType: '其他',
    processId: 'PRO0012',
  }
]

const originTargetKeys = mockData.filter(item => +item.processId % 3 > 1).map(item => item.processId);

const leftTableColumns = [
  {
    title: '工艺名称',
    dataIndex: 'processName',
    width: 130
  },
  // {
  //   title: '是否返修',
  //   dataIndex: 'isRepairProcess',
  //   width: 70,
  //   align: 'right',
  //   render: tag => <Tag>{tag === 1 ? '是' : '否'}</Tag>,
  // },
];
const rightTableColumns = [
  {
    title: '工艺名称',
    dataIndex: 'processName',
    width: 130
  },
  // {
  //   title: '是否返修',
  //   dataIndex: 'isRepairProcess',
  //   width: 70,
  //   align: 'right',
  //   render: tag => <Tag>{tag === 1 ? '是' : '否'}</Tag>,
  // }
];


const {Option} = Select;
const {RangePicker} = DatePicker;
const miGroup = {
  kaiLiao: {
    processId: 6,
    child: {
      kaiLiao_spec: {
        label: '规格',
        code: 'kaiLiao_spec',
        id: 2
      },
      kaiLiao_panelThickness: {
        label: '板厚',
        code: 'kaiLiao_panelThickness',
        id: 4
      },
      kaiLiao_bakeBoard: {
        label: '烤板',
        code: 'kaiLiao_bakeBoard',
        id: 6
      },
      kaiLiao_supplier: {
        label: '厂商',
        code: 'kaiLiao_supplier',
        id: 8
      },
      kaiLiao_coppurThickness: {
        label: '铜厚',
        code: 'kaiLiao_coppurThickness',
        id: 10
      },
      kaiLiao_size: {
        label: '开料尺寸',
        code: 'kaiLiao_size',
        id: 152
      },
      kaiLiao_pnlSet: {
        label: 'PNL上SET数',
        code: 'kaiLiao_pnlSet',
        id: 154
      },
    }
  },
  neicengxianlu: {
    processId: 8,
    child: {
      neicengxianlu_moleixing: {
        label: '膜类型',
        code: 'neicengxianlu_moleixing',
        id: 12
      },
      neicengxianlu_width: {
        label: '线宽',
        code: 'neicengxianlu_width',
        id: 14
      },
      neicengxianlu_distance: {
        label: '线距',
        code: 'neicengxianlu_distance',
        id: 16
      },
    }


  },
  neicengkeshi: {
    processId: 10,
    child: {
      neicengkeshi_minWidth: {
        label: '原稿最小线宽',
        code: 'neicengkeshi_minWidth',
        id: 18
      },
      neicengkeshi_distance: {
        label: '线距',
        code: 'neicengkeshi_distance',
        id: 20
      },
    }
  },
  neicengjianyan: {
    processId: 12,
    child: {
      neicengjianyan_jianyanfangshi: {
        label: '检验方式',
        code: 'neicengjianyan_jianyanfangshi',
        id: 22
      },
    }
  },
  neiocengyanghua: {
    processId: 14,
    child: {
      neicengyanghua_yanghuafangshi: {
        label: '氧化方式',
        code: 'neicengyanghua_yanghuafangshi',
        id: 24
      },
    }
  },
  cengya: {
    processId: 16,
    child: {
      cengya_thickness: {
        label: '层压完成厚度',
        code: 'cengya_thickness',
        id: 26
      },
      cengya_thicknesswuchazhi: {
        label: '层压完成厚度误差值',
        code: 'cengya_thicknesswuchazhi',
        id: 140
      },
      cengya_cuppor: {
        label: '铜厚',
        code: 'cengya_cuppor',
        id: 28
      },
    }
  },
  bandian: {
    processId: 18,
    child: {
      bandian_el: {
        label: '钻孔前板电至',
        code: 'bandian_el',
        id: 30
      },
    }
  },
  waicengzuankong: {
    processId: 20,
    child: {
      waicengzuankong_min: {
        label: '最小孔径',
        code: 'waicengzuankong_min',
        id: 32
      },
      waicengzuankong_name: {
        label: '钻带名',
        code: 'waicengzuankong_name',
        id: 34
      },
    }
  },
  yicixiancao: {
    processId: 22,
    child: {
      yicixiancao_file: {
        label: '文件名',
        code: 'yicixiancao_file',
        id: 36
      },
    }
  },
  chengtongbandian: {
    processId: 24,
    child: {
      chengtongbandian_glue: {
        label: '除胶漆',
        code: 'chengtongbandian_glue',
        id: 38
      },
    }
  },
  waicengtuxing: {
    processId: 26,
    child: {
      waicengtuxing_moleixing: {
        label: '膜类型',
        code: 'waicengtuxing_moleixing',
        id: 40
      },
      waicengtuxing_zhouqi: {
        label: '周期',
        code: 'waicengtuxing_zhouqi',
        id: 42
      },
      waicengtuxing_minWidth: {
        label: '生产稿最小线宽',
        code: 'waicengtuxing_minWidth',
        id: 44
      },
      waicengtuxing_distance: {
        label: '线距',
        code: 'waicengtuxing_distance',
        id: 46
      },
    }
  },
  dianDu: {
    processId: 28,
    child: {
      dianDu_fangshi: {
        label: '电镀方式',
        code: 'dianDu_fangshi',
        id: 48
      },
      dianDu_area: {
        label: '电镀有效面积',
        code: 'dianDu_area',
        id: 50
      },
      dianDu_hole: {
        label: '孔铜',
        code: 'dianDu_hole',
        id: 52
      },
      dianDu_Thickness: {
        label: '成品铜厚',
        code: 'dianDu_Thickness',
        id: 54
      },
    }
  },
  tuimoshijian: {
    processId: 30,
    child: {
      tuimoshijian_minWidth: {
        label: '原稿最小线宽',
        code: 'tuimoshijian_minWidth',
        id: 56
      },
      tuimoshijian_distance: {
        label: '线距',
        code: 'tuimoshijian_distance',
        id: 58
      },
      tuimoshijian_chuba: {
        label: '（蚀刻后，退锡前）除钯',
        code: 'tuimoshijian_chuba',
        id: 60
      },
    }
  },
  waicengshijian: {
    processId: 32,
    child: {
      waicengshijian_jianceleixing: {
        label: '检验方式',
        code: 'waicengshijian_jianceleixing',
        id: 62
      },
    }
  },
  siyinzuhan: {
    processId: 34,
    child: {
      siyinzuhan_color: {
        label: '颜色',
        code: 'siyinzuhan_color',
        id: 64
      },
      siyinzuhan_guokong: {
        label: '过孔',
        code: 'siyinzuhan_guokong',
        id: 66
      },
      siyinzuhan_qitaguokong: {
        label: '其他过孔方式',
        code: 'siyinzuhan_qitaguokong',
        id: 68
      },
      siyinzuhan_changjia: {
        label: '厂家',
        code: 'siyinzuhan_changjia',
        id: 70
      },
      siyinzuhan_zhouqi: {
        label: '周期',
        code: 'siyinzuhan_zhouqi',
        id: 72
      },
    }
  },
  siyinzifu: {
    processId: 36,
    child: {
      siyinzifu_color: {
        label: '颜色',
        code: 'siyinzifu_color',
        id: 74
      },
      siyinzifu_yuanjianmian: {
        label: '丝印面',
        code: 'siyinzifu_yuanjianmian',
        id: 76
      },
      siyinzifu_changjia: {
        label: '厂家',
        code: 'siyinzifu_changjia',
        id: 78
      },
      siyinzifu_zhouqi: {
        label: '年周',
        code: 'siyinzifu_zhouqi',
        id: 80
      },
    }
  },
  pengxi: {
    processId: 38,
    child: {
      pengxi_xihou: {
        label: '锡厚',
        code: 'pengxi_xihou',
        id: 82
      },
    }
  },
  chenniejin: {
    processId: 40,
    child: {
      chenniejin_niehou: {
        label: '镍厚',
        code: 'chenniejin_niehou',
        id: 84
      },
      chenniejin_jinhou: {
        label: '金厚',
        code: 'chenniejin_jinhou',
        id: 86
      },
    }
  },
  tanyou: {
    processId: 42,
    child: {
      tanyou_tanyou: {
        label: '碳油印于',
        code: 'tanyou_tanyou',
        id: 88
      },
    }
  },
  ercizuankong: {
    processId: 44,
    child: {
      ercizuankong_file: {
        label: '文件名',
        code: 'ercizuankong_file',
        id: 90
      },
    }
  },
  chengxing: {
    processId: 46,
    child: {
      chengxing_fangshi: {
        label: '成形方式',
        code: 'chengxing_fangshi',
        id: 92
      },
      chengxing_moju: {
        label: '模具编号',
        code: 'chengxing_moju',
        id: 94
      },
      chengxing_xiebian: {
        label: '斜边',
        code: 'chengxing_xiebian',
        id: 96
      },
      chengxing_jiaodu: {
        label: '角度',
        code: 'chengxing_jiaodu',
        id: 98
      },
      chengxing_jiaoduwuchazhi: {
        label: '角度误差值',
        code: 'chengxing_jiaoduwuchazhi',
        id: 142
      },
      chengxing_hou: {
        label: '余厚',
        code: 'chengxing_hou',
        id: 100
      },
      chengxing_houwuchazhi: {
        label: '余厚误差值',
        code: 'chengxing_houwuchazhi',
        id: 144
      },
    }
  },
  cut: {
    processId: 48,
    child: {
      cut_fangshi: {
        label: 'V-CUT方式',
        code: 'cut_fangshi',
        id: 102
      },
      cut_jiaodu: {
        label: '角度',
        code: 'cut_jiaodu',
        id: 104
      },
      cut_jiaoduwuchazhi: {
        label: '角度误差值',
        code: 'cut_jiaoduwuchazhi',
        id: 146
      },
      cut_yuhou: {
        label: '余厚',
        code: 'cut_yuhou',
        id: 106
      },
      cut_yuhouwuchazhi: {
        label: '余厚误差值',
        code: 'cut_yuhouwuchazhi',
        id: 148
      },
    }
  },
  test: {
    processId: 50,
    child: {
      test_feizheng: {
        label: '飞针',
        code: 'test_feizheng',
        id: 108
      },
      test_zhuanyong: {
        label: '专用',
        code: 'test_zhuanyong',
        id: 110
      },
      test_tongyong: {
        label: '通用',
        code: 'test_tongyong',
        id: 112
      },
      test_et: {
        label: '盖ET章',
        code: 'test_et',
        id: 114
      },
      test_huabian: {
        label: '色笔划边',
        code: 'test_huabian',
        id: 116
      },
      test_bianhao: {
        label: '治具编号',
        code: 'test_bianhao',
        id: 118
      },
    }
  },
  fqc: {
    processId: 52,
    child: {}
  },
  glue: {
    processId: 54,
    child: {
      glue_xinghao: {
        label: '型号',
        code: 'glue_xinghao',
        id: 120
      },
      glue_glue: {
        label: '蓝胶印于',
        code: 'glue_glue',
        id: 122
      },
    }
  },
  fqa: {
    processId: 56,
    child: {
      fqa_thickness: {
        label: '成品板厚',
        code: 'fqa_thickness',
        id: 124
      },
      fqa_thicknesswuchazhi: {
        label: '成品板厚误差值',
        code: 'fqa_thicknesswuchazhi',
        id: 150
      },
    }
  },
  baozhuang: {
    processId: 58,
    child: {
      baozhuang_baozhuangfangshi: {
        label: '包装方式',
        code: 'baozhuang_baozhuangfangshi',
        id: 126
      },
      baozhuang_qitabaozhuang: {
        label: '其它包装方式',
        code: 'baozhuang_qitabaozhuang',
        id: 128
      },
      baozhuang_chuhuofangshi: {
        label: '单片',
        code: 'baozhuang_chuhuofangshi',
        id: 130
      },
      baozhuang_lianpian: {
        label: '联片-允许每SER报废PCS数',
        code: 'baozhuang_lianpian',
        id: 132
      },
      baozhuang_baogao: {
        label: '出货报告',
        code: 'baozhuang_baogao',
        id: 134
      },
      baozhuang_qiepian: {
        label: '切片',
        code: 'baozhuang_qiepian',
        id: 136
      },
      baozhuang_kehan: {
        label: '可焊性',
        code: 'baozhuang_kehan',
        id: 138
      },
    }
  },
}
const fieldLabels = {
  productCode: {
    label: '产品编码',
    code: 'productCode',
  },
  productName: {
    label: '产品名称',
    code: 'productName',
  },
  custModelNo: {
    label: '客户型号',
    code: 'custModelNo',
  },
  custMatNo: {
    label: '物料号',
    code: 'custMatNo',
  },
  pcbLayerNum: {
    label: 'PCB层数',
    code: 'pcbLayerNum',
  },
  pcbType: {
    label: '板材类型',
    code: 'pcbType',
  },
  panelLength: {
    label: '拼版长度',
    code: 'panelLength',
  },
  panelWidth: {
    label: '拼版宽度',
    code: 'panelWidth',
  },
  panelPcbNum: {
    label: '拼版PCB数',
    code: 'panelPcbNum',
  },
  pnlSetNum: {
    label: 'PNL上SET数',
    code: 'pnlSetNum',
  },
  custId: {
    label: '客户',
    code: 'custId',
  },
  remark: {
    label: '备注',
    code: 'remark',
  },

  kaiLiao_spec: {
    label: '规格',
    code: 'kaiLiao_spec',
    id: 2
  },
  kaiLiao_panelThickness: {
    label: '板厚',
    code: 'kaiLiao_panelThickness',
    id: 4
  },
  kaiLiao_bakeBoard: {
    label: '烤板',
    code: 'kaiLiao_bakeBoard',
    id: 6
  },
  kaiLiao_supplier: {
    label: '厂商',
    code: 'kaiLiao_supplier',
    id: 8
  },
  kaiLiao_coppurThickness: {
    label: '铜厚',
    code: 'kaiLiao_coppurThickness',
    id: 10
  },
  kaiLiao_size: {
    label: '开料尺寸',
    code: 'kaiLiao_size',
    id: 152
  },
  kaiLiao_pnlSet: {
    label: 'PNL上SET数',
    code: 'kaiLiao_pnlSet',
    id: 154
  },

  neicengxianlu_moleixing: {
    label: '膜类型',
    code: 'neicengxianlu_moleixing',
    id: 12
  },
  neicengxianlu_width: {
    label: '线宽',
    code: 'neicengxianlu_width',
    id: 14
  },
  neicengxianlu_distance: {
    label: '线距',
    code: 'neicengxianlu_distance',
    id: 16
  },

  neicengkeshi_minWidth: {
    label: '原稿最小线宽',
    code: 'neicengkeshi_minWidth',
    id: 18
  },
  neicengkeshi_distance: {
    label: '线距',
    code: 'neicengkeshi_distance',
    id: 20
  },

  neicengjianyan_jianyanfangshi: {
    label: '检验方式',
    code: 'neicengjianyan_jianyanfangshi',
    id: 22
  },

  neicengyanghua_yanghuafangshi: {
    label: '氧化方式',
    code: 'neicengyanghua_yanghuafangshi',
    id: 24
  },

  cengya_thickness: {
    label: '层压完成厚度',
    code: 'cengya_thickness',
    id: 26
  },
  cengya_thicknesswuchazhi: {
    label: '层压完成厚度误差值',
    code: 'cengya_thicknesswuchazhi',
    id: 140
  },
  cengya_cuppor: {
    label: '铜厚',
    code: 'cengya_cuppor',
    id: 28
  },

  bandian_el: {
    label: '钻孔前板电至',
    code: 'bandian_el',
    id: 30
  },

  waicengzuankong_min: {
    label: '最小孔径',
    code: 'waicengzuankong_min',
    id: 32
  },
  waicengzuankong_name: {
    label: '钻带名',
    code: 'waicengzuankong_name',
    id: 34
  },

  yicixiancao_file: {
    label: '文件名',
    code: 'yicixiancao_file',
    id: 36
  },

  chengtongbandian_glue: {
    label: '除胶漆',
    code: 'chengtongbandian_glue',
    id: 38
  },

  waicengtuxing_moleixing: {
    label: '膜类型',
    code: 'waicengtuxing_moleixing',
    id: 40
  },
  waicengtuxing_zhouqi: {
    label: '周期',
    code: 'waicengtuxing_zhouqi',
    id: 42
  },
  waicengtuxing_minWidth: {
    label: '生产稿最小线宽',
    code: 'waicengtuxing_minWidth',
    id: 44
  },
  waicengtuxing_distance: {
    label: '线距',
    code: 'waicengtuxing_distance',
    id: 46
  },

  dianDu_fangshi: {
    label: '电镀方式',
    code: 'dianDu_fangshi',
    id: 48
  },
  dianDu_area: {
    label: '电镀有效面积',
    code: 'dianDu_area',
    id: 50
  },
  dianDu_hole: {
    label: '孔铜',
    code: 'dianDu_hole',
    id: 52
  },
  dianDu_Thickness: {
    label: '成品铜厚',
    code: 'dianDu_Thickness',
    id: 54
  },

  tuimoshijian_minWidth: {
    label: '原稿最小线宽',
    code: 'tuimoshijian_minWidth',
    id: 56
  },
  tuimoshijian_distance: {
    label: '线距',
    code: 'tuimoshijian_distance',
    id: 58
  },
  tuimoshijian_chuba: {
    label: '（蚀刻后，退锡前）除钯',
    code: 'tuimoshijian_chuba',
    id: 60
  },

  waicengshijian_jianceleixing: {
    label: '检验方式',
    code: 'waicengshijian_jianceleixing',
    id: 62
  },

  siyinzuhan_color: {
    label: '颜色',
    code: 'siyinzuhan_color',
    id: 64
  },
  siyinzuhan_guokong: {
    label: '过孔',
    code: 'siyinzuhan_guokong',
    id: 66
  },
  siyinzuhan_qitaguokong: {
    label: '其他过孔方式',
    code: 'siyinzuhan_qitaguokong',
    id: 68
  },
  siyinzuhan_changjia: {
    label: '厂家',
    code: 'siyinzuhan_changjia',
    id: 70
  },
  siyinzuhan_zhouqi: {
    label: '周期',
    code: 'siyinzuhan_zhouqi',
    id: 72
  },

  siyinzifu_color: {
    label: '颜色',
    code: 'siyinzifu_color',
    id: 74
  },
  siyinzifu_yuanjianmian: {
    label: '丝印面',
    code: 'siyinzifu_yuanjianmian',
    id: 76
  },
  siyinzifu_changjia: {
    label: '厂家',
    code: 'siyinzifu_changjia',
    id: 78
  },
  siyinzifu_zhouqi: {
    label: '年周',
    code: 'siyinzifu_zhouqi',
    id: 80
  },

  pengxi_xihou: {
    label: '锡厚',
    code: 'pengxi_xihou',
    id: 82
  },

  chenniejin_niehou: {
    label: '镍厚',
    code: 'chenniejin_niehou',
    id: 84
  },
  chenniejin_jinhou: {
    label: '金厚',
    code: 'chenniejin_jinhou',
    id: 86
  },

  tanyou_tanyou: {
    label: '碳油印于',
    code: 'tanyou_tanyou',
    id: 88
  },

  ercizuankong_file: {
    label: '文件名',
    code: 'ercizuankong_file',
    id: 90
  },

  chengxing_fangshi: {
    label: '成形方式',
    code: 'chengxing_fangshi',
    id: 92
  },
  chengxing_moju: {
    label: '模具编号',
    code: 'chengxing_moju',
    id: 94
  },
  chengxing_xiebian: {
    label: '斜边',
    code: 'chengxing_xiebian',
    id: 96
  },
  chengxing_jiaodu: {
    label: '角度',
    code: 'chengxing_jiaodu',
    id: 98
  },
  chengxing_jiaoduwuchazhi: {
    label: '角度误差值',
    code: 'chengxing_jiaoduwuchazhi',
    id: 142
  },
  chengxing_hou: {
    label: '余厚',
    code: 'chengxing_hou',
    id: 100
  },
  chengxing_houwuchazhi: {
    label: '余厚误差值',
    code: 'chengxing_houwuchazhi',
    id: 144
  },

  cut_fangshi: {
    label: 'V-CUT方式',
    code: 'cut_fangshi',
    id: 102
  },
  cut_jiaodu: {
    label: '角度',
    code: 'cut_jiaodu',
    id: 104
  },
  cut_jiaoduwuchazhi: {
    label: '角度误差值',
    code: 'cut_jiaoduwuchazhi',
    id: 146
  },
  cut_yuhou: {
    label: '余厚',
    code: 'cut_yuhou',
    id: 106
  },
  cut_yuhouwuchazhi: {
    label: '余厚误差值',
    code: 'cut_yuhouwuchazhi',
    id: 148
  },

  test_feizheng: {
    label: '飞针',
    code: 'test_feizheng',
    id: 108
  },
  test_zhuanyong: {
    label: '专用',
    code: 'test_zhuanyong',
    id: 110
  },
  test_tongyong: {
    label: '通用',
    code: 'test_tongyong',
    id: 112
  },
  test_et: {
    label: '盖ET章',
    code: 'test_et',
    id: 114
  },
  test_huabian: {
    label: '色笔划边',
    code: 'test_huabian',
    id: 116
  },
  test_bianhao: {
    label: '治具编号',
    code: 'test_bianhao',
    id: 118
  },

  glue_xinghao: {
    label: '型号',
    code: 'glue_xinghao',
    id: 120
  },
  glue_glue: {
    label: '蓝胶印于',
    code: 'glue_glue',
    id: 122
  },

  fqa_thickness: {
    label: '成品板厚',
    code: 'fqa_thickness',
    id: 124
  },
  fqa_thicknesswuchazhi: {
    label: '成品板厚误差值',
    code: 'fqa_thicknesswuchazhi',
    id: 150
  },

  baozhuang_baozhuangfangshi: {
    label: '包装方式',
    code: 'baozhuang_baozhuangfangshi',
    id: 126
  },
  baozhuang_qitabaozhuang: {
    label: '其它包装方式',
    code: 'baozhuang_qitabaozhuang',
    id: 128
  },
  baozhuang_chuhuofangshi: {
    label: '单片',
    code: 'baozhuang_chuhuofangshi',
    id: 130
  },
  baozhuang_lianpian: {
    label: '联片-允许每SER报废PCS数',
    code: 'baozhuang_lianpian',
    id: 132
  },
  baozhuang_baogao: {
    label: '出货报告',
    code: 'baozhuang_baogao',
    id: 134
  },
  baozhuang_qiepian: {
    label: '切片',
    code: 'baozhuang_qiepian',
    id: 136
  },
  baozhuang_kehan: {
    label: '可焊性',
    code: 'baozhuang_kehan',
    id: 138
  },


};

let exElArr = [];
let exElKeyArr = [];
let exPnlNum = 1;
const upperCaseLetter = [
  'A',
  'B',
  'C',
  'D',
  'E',
  'F',
  'G',
  'H',
  'I',
  'J',
  'K',
  'L',
  'M',
  'N',
  'O',
  'P',
  'Q',
  'R',
  'S',
  'T',
  'U',
  'V',
  'W',
  'X',
  'Y',
  'Z'
];

const ProductForm = (props, {submitting, dispatch}) => {
  const {baseData, onSubmit, formType, dataDetail} = props;
  const {processData, customerData} = baseData;
  const {TextArea} = Input;
  const {Step} = Steps;
  const [form] = Form.useForm();
  const [error, setError] = useState([]);
  const [processError, setProcessError] = useState('');
  const [isProcessModalVisible, setIsProcessModalVisible] = useState(false);
  const [targetKeys, setTargetKeys] = useState([]);
  const [targetData, setTargetData] = useState([]);
  const [qitaGuoKongVisible, setQitaGuoKongVisible] = useState(false);
  const [qitaBaoZhuangisible, setQitaBaoZhuangisible] = useState(false);
  const [qitaChuHuoisible, setQitaChuHuoisible] = useState(false);
  const [pnlNum, setPnlNum] = useState(1)
  const [pnlAddClickCount, setPnlAddClickCount] = useState(1)
  const [pnlEl, setPnlEl] = useState([])
  const [pnlElKeyArr, setPnlElKeyArr] = useState([])
  const [isPnlAdd, setIsPnlAdd] = useState(Math.random())
  const [showPnlWarning, setShowPnlWarning] = useState(false);
  const [pnlWarningMsg, setPnlWarningMsg] = useState('');

  // 产品基本信息赋初值
  useEffect(() => {
    //console.log(('useEffect')
    if (formType > 1) { // 如果formType> 1(编辑或者详情)则填充数据
      form.setFieldsValue({...dataDetail})
      const initTargetKeys = dataDetail.prdProductTechnologyProcesses.map(item => {
        return item.processId
      })
      setTargetKeys(initTargetKeys)

      // 工艺流程信息赋初值
      if (initTargetKeys.length > 0) {
        setTargetData(processData.filter(item => {
          return initTargetKeys.indexOf(item.processId) > -1
        }))
      }
    }
  }, [])

  // // 工艺流程信息赋初值
  // useEffect(()=>{
  //   if (targetKeys.length > 0) {
  //     setTargetData(processData.filter(item => {
  //       return targetKeys.indexOf(item.processId) > -1
  //     }))
  //   }
  // },[targetKeys])

  // 产品MI参数赋初值
  useEffect(() => {
    if (formType > 1) {
      const miValus = new Object();
      let pnlSetIsRender = false;
      dataDetail.prdProductTechnologyProcesses.forEach(prpcess => {
        prpcess.prdProductMiValues.forEach(mi => {
          Object.keys(miGroup).forEach(processKey => {
            if (mi.processId === miGroup[processKey].processId) {
              Object.keys(miGroup[processKey].child).forEach(miKey => {
                if (mi.miId === miGroup[processKey].child[miKey].id) {
                  miValus[miGroup[processKey].child[miKey].code] = mi.miValue
                }
                // Pnl上Set数和开料尺寸赋初值
                if ((mi.miId === 152 || mi.miId === 154) && !pnlSetIsRender && targetData.length > 0) {
                  pnlSetIsRender = true
                  const pnlSizeArr = mi.miValue.split(',');
                  for (let j = 0; j < pnlSizeArr.length -1; j += 1) {
                    setPnlAddClickCount(pnlAddClickCount + 1)
                    setPnlNum(pnlNum + 1)
                    exPnlNum += 1
                    setIsPnlAdd(Math.random())
                  }
                }
              })
            }
          })
        })
      })
      form.setFieldsValue({...miValus})
    }
  }, [targetData])

  // 产品Pnl Set MI参数赋初值
  useEffect(() => {
    if (formType > 1 && pnlElKeyArr.length > 0) {
      const miValus = new Object();
      dataDetail.prdProductTechnologyProcesses.forEach(prpcess => {
        prpcess.prdProductMiValues.forEach(mi => {
          if (mi.miId === 152) {
            const valueArr = mi.miValue.split(',');
            valueArr.forEach((v, index)=> {
              miValus['kaiLiao_size' + exElKeyArr[index + 1]] = valueArr[index]
            })
          }
          if (mi.miId === 154) {
            const valueArr = mi.miValue.split(',');
            valueArr.forEach((v, index)=> {
              miValus['kaiLiao_pnlSet' + exElKeyArr[index + 1]] = valueArr[index]
            })
          }
        })
      })
      console.log(miValus)
      form.setFieldsValue({...miValus})
    }
  })

  useEffect(() => {
    exElArr = [];
    exPnlNum = 1;
    exElKeyArr = []
  }, [])


  const minusEl = (key) => {
    const newKeyArr = pnlElKeyArr.filter(i => {
      return i !== key
    })
    const newEl = exElArr.filter(i => {
      return i.key !== key
    })
      .map((item, index) => {
        const newKey = newKeyArr[index]
        return <Row gutter={16} key={newKey}>
          <Col lg={8} md={12} sm={24}>
            <Form.Item
              label={`PNL${upperCaseLetter[index]} SET数`}
              name={fieldLabels.kaiLiao_pnlSet.code + newKey}
              rules={[
                {
                  required: true,
                  message: `请输入PNL${upperCaseLetter[index]}中的SET数`
                }
              ]}
            >
              <InputNumber disabled={formType === 3} placeholder={`请输入${fieldLabels.kaiLiao_pnlSet.label}`}
                           min={1} style={{width: '100%'}}/>
            </Form.Item>
          </Col>
          <Col lg={8} md={12} sm={24}>
            <Form.Item
              label={`PNL${upperCaseLetter[index]} 开料尺寸(格式：长度*宽度)`}
              name={fieldLabels.kaiLiao_size.code + newKey}
              rules={[
                {
                  pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?\*(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?$/,
                  message: '格式：长度*宽度'
                },
                {
                  required: true,
                  message: `请输入PNL${upperCaseLetter[index]}开料尺寸`
                }
              ]}
            >
              <Input disabled={formType === 3}
                     placeholder={`请输入${fieldLabels.kaiLiao_size.label}`}
              />
            </Form.Item>
          </Col>
          <Col lg={8} md={12} sm={24} style={{display: index === 0 || formType === 3 ? 'none' : '', paddingTop: '30px'}}>
            <Tooltip title="删除该PNL">
              <Button shape="circle" type="dashed" icon={<MinusOutlined/>} style={{color: '#d9d9d9'}} onClick={() => {
                minusEl(newKey)
              }}/>
            </Tooltip>
          </Col>
        </Row>
      })
    setPnlElKeyArr(newKeyArr);
    setPnlEl(newEl)
    exElArr = newEl
    setPnlNum(pnlNum - 1)
    exPnlNum -= 1
  }

  // 新增 生成pnl框
  useEffect(() => {
    if (formType === 1) {
      const el = [];
      for (let i = 0; i < exPnlNum; i += 1) {
        if (i === exPnlNum - 1) {
          const key = moment().format('YYYYMMDDHHmmssSSS') + Math.random()
          const newKeyArr = pnlElKeyArr;
          newKeyArr.push(key);
          setPnlElKeyArr(newKeyArr)
          el.push(<Row gutter={16} key={key}>
            <Col lg={8} md={12} sm={24}>
              <Form.Item
                label={`PNL${upperCaseLetter[i]} SET数`}
                name={fieldLabels.kaiLiao_pnlSet.code + key}
                rules={[
                  {
                    required: true,
                    message: `请输入PNL${upperCaseLetter[i]}中的SET数`
                  }
                ]}
              >
                <InputNumber disabled={formType === 3} placeholder={`请输入${fieldLabels.kaiLiao_pnlSet.label}`}
                             min={1} style={{width: '100%'}}/>
              </Form.Item>
            </Col>
            <Col lg={8} md={12} sm={24}>
              <Form.Item
                label={`PNL${upperCaseLetter[i]} 开料尺寸(格式：长度*宽度)`}
                name={fieldLabels.kaiLiao_size.code + key}
                rules={[
                  {
                    pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?\*(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?$/,
                    message: '格式：长度*宽度'
                  },
                  {
                    required: true,
                    message: `请输入PNL${upperCaseLetter[i]}开料尺寸`
                  }
                ]}
              >
                <Input disabled={formType === 3}
                       placeholder={`请输入${fieldLabels.kaiLiao_size.label}`}
                />
              </Form.Item>
            </Col>
            <Col lg={8} md={12} sm={24} style={{display: i === 0 || formType === 3 ? 'none' : '', paddingTop: '30px'}}>
              <Tooltip title="删除该PNL">
                <Button shape="circle" type="dashed" icon={<MinusOutlined/>} style={{color: '#d9d9d9'}} onClick={() => {
                  minusEl(key)
                }}/>
              </Tooltip>
            </Col>
          </Row>)
        } else {
          const key = pnlElKeyArr[i]
          el.push(<Row gutter={16} key={key}>
            <Col lg={8} md={12} sm={24}>
              <Form.Item
                label={`PNL${upperCaseLetter[i]} SET数`}
                name={fieldLabels.kaiLiao_pnlSet.code + key}
                rules={[
                  {
                    required: true,
                    message: `请输入PNL${upperCaseLetter[i]}中的SET数`
                  }
                ]}
              >
                <InputNumber disabled={formType === 3} placeholder={`请输入${fieldLabels.kaiLiao_pnlSet.label}`}
                             min={1} style={{width: '100%'}}/>
              </Form.Item>
            </Col>
            <Col lg={8} md={12} sm={24}>
              <Form.Item
                label={`PNL${upperCaseLetter[i]} 开料尺寸(格式：长度*宽度)`}
                name={fieldLabels.kaiLiao_size.code + key}
                rules={[
                  {
                    pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?\*(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?$/,
                    message: '格式：长度*宽度'
                  },
                  {
                    required: true,
                    message: `请输入PNL${upperCaseLetter[i]}开料尺寸`
                  }
                ]}
              >
                <Input disabled={formType === 3}
                       placeholder={`请输入${fieldLabels.kaiLiao_size.label}`}
                />
              </Form.Item>
            </Col>
            <Col lg={8} md={12} sm={24} style={{display: i === 0 || formType === 3 ? 'none' : '', paddingTop: '30px'}}>
              <Tooltip title="删除该PNL">
                <Button shape="circle" type="dashed" icon={<MinusOutlined/>} style={{color: '#d9d9d9'}} onClick={() => {
                  minusEl(key)
                }}/>
              </Tooltip>
            </Col>
          </Row>)
        }
      }
      setPnlEl(el)
      exElArr = el
    }
  }, [isPnlAdd])

  // 详情 编辑 生成pnl框
  useEffect(()=>{
    if (formType > 1) {
      const el = [];
      console.log(exPnlNum)
      for (let i = 0; i < exPnlNum; i += 1) {
        const key = moment().format('YYYYMMDDHHmmssSSS') + Math.random()
        console.log(key)
        exElKeyArr.push(key)
        const newKeyArr = pnlElKeyArr;
        newKeyArr.push(key);
        setPnlElKeyArr(newKeyArr)
        el.push(<Row gutter={16} key={key}>
          <Col lg={8} md={12} sm={24}>
            <Form.Item
              label={`PNL${upperCaseLetter[i]} SET数`}
              name={fieldLabels.kaiLiao_pnlSet.code + key}
              rules={[
                {
                  required: true,
                  message: `请输入PNL${upperCaseLetter[i]}中的SET数`
                }
              ]}
            >
              <InputNumber disabled={formType === 3} placeholder={`请输入${fieldLabels.kaiLiao_pnlSet.label}`}
                           min={1} style={{width: '100%'}}/>
            </Form.Item>
          </Col>
          <Col lg={8} md={12} sm={24}>
            <Form.Item
              label={`PNL${upperCaseLetter[i]} 开料尺寸(格式：长度*宽度)`}
              name={fieldLabels.kaiLiao_size.code + key}
              rules={[
                {
                  pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?\*(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,2})?$/,
                  message: '格式：长度*宽度'
                },
                {
                  required: true,
                  message: `请输入PNL${upperCaseLetter[i]}开料尺寸`
                }
              ]}
            >
              <Input disabled={formType === 3}
                     placeholder={`请输入${fieldLabels.kaiLiao_size.label}`}
              />
            </Form.Item>
          </Col>
          <Col lg={8} md={12} sm={24} style={{display: i === 0 || formType === 3 ? 'none' : '', paddingTop: '30px'}}>
            <Tooltip title="删除该PNL">
              <Button shape="circle" type="dashed" icon={<MinusOutlined/>} style={{color: '#d9d9d9'}} onClick={() => {
                minusEl(key)
              }}/>
            </Tooltip>
          </Col>
        </Row>)

      }
      setPnlEl(el)
      exElArr = el
    }
  }, [isPnlAdd])

  const getErrorInfo = (errors) => {
    //console.log((errors)
    let errorCount = errors.filter((item) => item.errors.length > 0).length;

    if (!errors || errorCount === 0) {
      return null;
    }

    const scrollToField = (fieldKey) => {
      const labelNode = document.querySelector(`label[for="${fieldKey}"]`);

      if (labelNode) {
        labelNode.scrollIntoView(true);
      }
    };

    const errorList = errors.map((err) => {
      if (!err || err.errors.length === 0) {
        return null;
      }

      const key = err.name[0];
      return (
        <li key={key} className={styles.errorListItem} onClick={() => scrollToField(key)}>
          <CloseCircleOutlined className={styles.errorIcon}/>
          <div className={styles.errorMessage}>{err.errors[0]}</div>
          <div className={styles.errorField}>{fieldLabels[key] ? fieldLabels[key].label : ''}</div>
        </li>
      );
    });
    if (targetKeys.length === 0) {
      errorCount += 1
      const processError = () => {
        return (
          <li key={-1} className={styles.errorListItem} onClick={() => scrollToField(-1)}>
            <CloseCircleOutlined className={styles.errorIcon}/>
            <div className={styles.errorMessage}>请配置工艺流程</div>
            <div className={styles.errorField}>请配置工艺流程</div>
          </li>
        )
      }
      errorList.push(processError())
    }
    return (
      <span className={styles.errorIcon}>
        <Popover
          title="表单校验信息"
          content={errorList}
          overlayClassName={styles.errorPopover}
          trigger="click"
          getPopupContainer={(trigger) => {
            if (trigger && trigger.parentNode) {
              return trigger.parentNode;
            }

            return trigger;
          }}
        >
          <CloseCircleOutlined/>
        </Popover>
        {errorCount}
      </span>
    );
  };

  const onFinish = (values) => {
    setError([]);
    dispatch({
      type: 'productForm/submitAdvancedForm',
      payload: values,
    });
  };

  const onFinishFailed = (errorInfo) => {
    setError(errorInfo.errorFields);
  };

  const onChange = (nextTargetKeys) => {
    setTargetKeys(nextTargetKeys)
    const targetDatas = nextTargetKeys.map(item => {
      for (const old of processData) {
        if (old.processId === item) {
          return old;
        }
      }
      return null;
    })
    setTargetData(targetDatas)
    if (targetDatas.length > 0) {
      setProcessError('')
    }
  }

  const handleProcessOk = () => {
    setIsProcessModalVisible(false);
  }

  const handleProcessCancel = () => {
    setIsProcessModalVisible(false);
  }

  const handleClick = (status) => {
    let data = {};
    const nameList = [
      fieldLabels.productCode.code,
      fieldLabels.custModelNo.code,
      fieldLabels.custMatNo.code,
      fieldLabels.custId.code,
      fieldLabels.pcbLayerNum.code,
      fieldLabels.pcbType.code,
      fieldLabels.panelLength.code,
      fieldLabels.panelWidth.code,
      fieldLabels.panelPcbNum.code,
      // fieldLabels.pnlSetNum.code,
    ]
    pnlElKeyArr.forEach(key=>{
      nameList.push(fieldLabels.kaiLiao_size.code + key)
      nameList.push(fieldLabels.kaiLiao_pnlSet.code + key)
    })
    console.log(nameList)
    form.validateFields(nameList).then(values => {
      if (targetKeys.length > 0) {
        let pnlValidator = true;
        const unitSetSize = dataDetail.panelLength * dataDetail.panelWidth;
        for (let i = (formType === 1? 0: 1); i < pnlElKeyArr.length; i += 1) {
          const totalSetSize = values[fieldLabels.kaiLiao_pnlSet.code + pnlElKeyArr[i]] * unitSetSize;
          const pnlSizeArr = values[fieldLabels.kaiLiao_size.code + pnlElKeyArr[i]].split('*')
          const pnlSize = pnlSizeArr[0] * pnlSizeArr[1]
          debugger
          if (totalSetSize > pnlSize * 1.05) {
            console.log(`PNL${upperCaseLetter[i]}: Set总面积大于PNL面积的105%`)
            setPnlWarningMsg(`PNL ${upperCaseLetter[i]}: Set总面积大于PNL面积的105%`)
            setShowPnlWarning(true)
            pnlValidator = false
            break;
          }
          if (totalSetSize < pnlSize * 0.85) {
            console.log(`PNL${upperCaseLetter[i]}: Set总面积小于PNL面积的85%`)
            setPnlWarningMsg(`PNL ${upperCaseLetter[i]}: Set总面积小于PNL面积的85%`)
            setShowPnlWarning(true)
            pnlValidator = false
            break;
          }
        }
        if (!pnlValidator) {
          return
        }else {
          setShowPnlWarning(false)
        }

        setProcessError('')
        data = values;
        targetData.map(ietm => {
          return ietm
        })
        data.prdProductTechnologyProcesses = targetData.map((item, idx) => {
          let prdProductMiValues = [];
          Object.keys(miGroup).forEach(processKey => {
            if (miGroup[processKey].processId === item.processId) { // 找到对应的工艺流ID
              const miList = [];
              Object.keys(miGroup[processKey].child).forEach(miKey => {
                const value = {
                  processId: miGroup[processKey].processId,
                  miId: miGroup[processKey].child[miKey].id,
                  miValue: '',
                }
                if (miGroup[processKey].processId === 6 && (miGroup[processKey].child[miKey].id === 154 || miGroup[processKey].child[miKey].id === 152)) {
                  value.miValue = pnlElKeyArr.map(i => {
                    return form.getFieldValue(miGroup[processKey].child[miKey].code + i)
                  }).join()
                } else {
                  value.miValue = Array.isArray(form.getFieldValue(miGroup[processKey].child[miKey].code)) ? form.getFieldValue(miGroup[processKey].child[miKey].code).join() : form.getFieldValue(miGroup[processKey].child[miKey].code)
                }
                miList.push(value)
              })
              prdProductMiValues = miList;
            }
          })
          item.processSortNum = idx;
          item.prdProductMiValues = prdProductMiValues
          return item;
        })
        data.productStatus = status
        onSubmit(data)
      } else {
        setProcessError('请配置工艺段流程')
      }

    }).catch(err => {
      //console.log((err)
    })

  }

  const onGuoKongTypeChange = (e) => {
    if (e.target.value === '其他') {
      setQitaGuoKongVisible(true)
    } else {
      setQitaGuoKongVisible(false)
    }
  }

  const onBaoZhuangChange = (e) => {
    if (e.target.value === '其他') {
      setQitaBaoZhuangisible(true)
    } else {
      setQitaBaoZhuangisible(false)
    }
  }

  const onChuHuoChange = (e) => {
    if (e.target.value === '联片') {
      setQitaChuHuoisible(true)
    } else {
      setQitaChuHuoisible(false)
    }
  }

  return (
    <div className={'product-form'}>
      <Form
        form={form}
        layout="vertical"
        hideRequiredMark
        onFinish={onFinish}
        onFinishFailed={onFinishFailed}
      >
        <>
          <Card title="基本信息" className={styles.card} bordered={false}>
            <Row gutter={16}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.productCode.label}
                  name={fieldLabels.productCode.code}
                  rules={[
                    {
                      required: true,
                      message: '请输入产品编码',
                    },
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 1} placeholder="请输入产品编码"/>
                </Form.Item>
              </Col>
              {/*<Col lg={8} md={12} sm={24}>*/}
              {/*  <Form.Item*/}
              {/*    label={fieldLabels.productName.label}*/}
              {/*    name={fieldLabels.productName.code}*/}
              {/*    rules={[*/}
              {/*      {*/}
              {/*        required: true,*/}
              {/*        message: `请输入${fieldLabels.productName.label}`,*/}
              {/*      },*/}
              {/*    ]}*/}
              {/*  >*/}
              {/*    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.productName.label}`}/>*/}
              {/*  </Form.Item>*/}
              {/*</Col>*/}
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custId.label}
                  name={fieldLabels.custId.code}
                  rules={[
                    {
                      required: true,
                      message: `请输入${fieldLabels.custId.label}`,
                    },
                  ]}
                >
                  <Select disabled={formType === 3}>
                    {customerData.map(item => {
                      return <Option value={item.custId} key={item.custId}>{item.custName}</Option>
                    })}
                  </Select>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custModelNo.label}
                  name={fieldLabels.custModelNo.code}
                  rules={[
                    {
                      required: true,
                      message: '请输入客户型号',
                    },
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType === 3} placeholder="请输入客户型号"/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={16}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.pcbType.label}
                  name={fieldLabels.pcbType.code}
                  rules={[
                    {
                      required: true,
                      message: `请输入${fieldLabels.pcbType.label}`,
                    },
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.pcbType.label}`}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.panelLength.label}
                  name={fieldLabels.panelLength.code}
                  rules={[
                    {
                      required: true,
                      message: `请输入${fieldLabels.panelLength.label}`,
                    },
                    {
                      pattern: /^\d+(\.\d{0,2})?$/,
                      message: '只能输入两位小数'
                    }
                  ]}
                >
                  {/*<Input disabled={formType === 3} placeholder={`请输入${fieldLabels.panelLength.label}`}/>*/}
                  <InputNumber
                    min={1}
                    style={{width: '100%'}}
                    formatter={value => `${value}mm`}
                    parser={value => value.replace('mm', '')}
                    disabled={formType === 3}
                    placeholder={`请输入${fieldLabels.panelLength.label}`}
                  />
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.panelWidth.label}
                  name={fieldLabels.panelWidth.code}
                  rules={[
                    {
                      required: true,
                      message: `请输入${fieldLabels.panelWidth.label}`,
                    },
                    {
                      pattern: /^\d+(\.\d{0,2})?$/,
                      message: '只能输入两位小数'
                    }
                  ]}
                >
                  {/*<Input disabled={formType === 3} placeholder={`请输入${fieldLabels.panelWidth.label}`}/>*/}
                  <InputNumber
                    min={1}
                    style={{width: '100%'}}
                    formatter={value => `${value}mm`}
                    parser={value => value.replace('mm', '')}
                    disabled={formType === 3}
                    placeholder={`请输入${fieldLabels.panelWidth.label}`}
                  />
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={16}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.panelPcbNum.label}
                  name={fieldLabels.panelPcbNum.code}
                  rules={[
                    {
                      required: true,
                      message: `请输入${fieldLabels.panelPcbNum.label}`,
                    },
                    {
                      pattern: /^[1-9]\d*$/,
                      message: '只能输入整数'
                    }
                  ]}
                >
                  {/*<Input disabled={formType === 3} placeholder={`请输入${fieldLabels.panelPcbNum.label}`}/>*/}
                  <InputNumber
                    min={1}
                    style={{width: '100%'}}
                    disabled={formType === 3}
                    placeholder={`请输入${fieldLabels.panelPcbNum.label}`}
                  />
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custMatNo.label}
                  name={fieldLabels.custMatNo.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType === 3} placeholder="请输入客户物料号"/>
                </Form.Item>
              </Col>
              {/*<Col lg={8} md={12} sm={24}>*/}
              {/*  <Form.Item*/}
              {/*    label={fieldLabels.pnlSetNum.label}*/}
              {/*    name={fieldLabels.pnlSetNum.code}*/}
              {/*    rules={[*/}
              {/*      {*/}
              {/*        required: true,*/}
              {/*        message: '请选择SET数',*/}
              {/*      },*/}
              {/*      {*/}
              {/*        pattern: /^[1-9]\d*$/,*/}
              {/*        message: '只能输入整数'*/}
              {/*      }*/}
              {/*    ]}*/}
              {/*  >*/}
              {/*    <InputNumber*/}
              {/*      min={1}*/}
              {/*      style={{width: '100%'}}*/}
              {/*      disabled={formType === 3}*/}
              {/*      placeholder={`请输入${fieldLabels.pnlSetNum.label}`}*/}
              {/*    />*/}
              {/*  </Form.Item>*/}
              {/*</Col>*/}
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.pcbLayerNum.label}
                  name={fieldLabels.pcbLayerNum.code}
                  rules={[
                    {
                      required: true,
                      message: '请选择PCB层数',
                    },
                    {
                      pattern: /^[1-9]\d*$/,
                      message: '只能输入整数'
                    }
                  ]}
                >
                  {/*<Input disabled={formType === 3} placeholder="请输入PCB层数"/>*/}
                  <InputNumber
                    min={1}
                    style={{width: '100%'}}
                    disabled={formType === 3}
                    placeholder={`请输入${fieldLabels.pcbLayerNum.label}`}
                  />
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={16}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.remark.label}
                  name={fieldLabels.remark.code}
                >
                  <TextArea disabled={formType === 3} placeholder={`请输入${fieldLabels.remark.label}`}/>
                </Form.Item>
              </Col>
            </Row>
          </Card>
          <Card title="工艺段流程" className={styles.card} bordered={false} style={{marginTop:'20px'}}>
            <div gutter={16} className={'process-row'}>
              <Button style={{marginBottom: '25px', display: formType === 3? 'none':''}} className={'process-btn'} type="primary"
                      onClick={() => setIsProcessModalVisible(true)}>配置工艺段流程</Button>
              <span style={{color: 'red', marginLeft: '10px', lineHeight: '30px'}}>{processError}</span>
              <Steps current={targetData.length - 1} labelPlacement={'vertical'}>
                {
                  targetData.map(item => {
                    return <Step title={item.processName} key={item.processId} icon={<HddOutlined/>}/>
                  })
                }

              </Steps>
              <Modal title="工艺段流程配置" width={700} visible={isProcessModalVisible} onOk={handleProcessOk}
                     onCancel={handleProcessCancel}>
                <PickList
                  disabled={formType === 3}
                  rowKey={'processId'}
                  titles={['全部工艺流程', '已选工艺流程']}
                  dataSource={processData}
                  targetKeys={targetKeys}
                  leftColumns={leftTableColumns}
                  rightColumns={rightTableColumns}
                  onChange={onChange}/>
                <div style={{color: 'rgb(217 217 217)', marginTop: '10px'}}><ExclamationCircleOutlined/> 可以上下拖动工艺改变工艺顺序
                </div>
              </Modal>
            </div>
          </Card>
          <Card title="工艺MI参数" bordered={false}>
            <div className={'kaiLiao'}
                 style={{display: targetData.map(item => item.processId).indexOf(6) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">开料</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.kaiLiao_spec.label}
                    name={fieldLabels.kaiLiao_spec.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.kaiLiao_spec.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input
                      disabled={formType === 3}
                      addonAfter="mm"
                      placeholder={`请输入${fieldLabels.kaiLiao_spec.label}`}
                    />
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.kaiLiao_panelThickness.label}
                    name={fieldLabels.kaiLiao_panelThickness.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.kaiLiao_panelThickness.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.kaiLiao_panelThickness.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.kaiLiao_bakeBoard.label}
                    name={fieldLabels.kaiLiao_bakeBoard.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.kaiLiao_bakeBoard.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           // addonAfter="H"
                           placeholder={`请输入${fieldLabels.kaiLiao_bakeBoard.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.kaiLiao_supplier.label}
                    name={fieldLabels.kaiLiao_supplier.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.kaiLiao_supplier.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.kaiLiao_supplier.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.kaiLiao_coppurThickness.label}
                    name={fieldLabels.kaiLiao_coppurThickness.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.kaiLiao_coppurThickness.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="oz"
                           placeholder={`请输入${fieldLabels.kaiLiao_coppurThickness.label}`}/>
                  </Form.Item>
                </Col>
                {/*<Col lg={8} md={12} sm={24}>*/}
                {/*  <Form.Item*/}
                {/*    label={fieldLabels.kaiLiao_size.label}*/}
                {/*    name={fieldLabels.kaiLiao_size.code}*/}
                {/*    rules={[*/}
                {/*      {*/}
                {/*        max: 32,*/}
                {/*        message: '最大长度为32'*/}
                {/*      },*/}
                {/*    ]}*/}
                {/*  >*/}
                {/*    <Input disabled={formType === 3}*/}
                {/*           placeholder={`请输入${fieldLabels.kaiLiao_size.label}`}/>*/}
                {/*  </Form.Item>*/}
                {/*</Col>*/}
              </Row>
              <Row gutter={16} style={{display: formType === 3 ? 'none' : '',marginBottom: '25px'}}>
                <Col lg={8} md={12} sm={24} style={{display: 'flex', alignItems: 'center'}}>
                  <Tooltip title="请根据工艺添加该产品所使用的不同规格PNL,最多5个">
                    <Button icon={<PlusOutlined/>} className={'process-btn'}
                            type="primary"
                            disabled={pnlNum > 4}
                            onClick={() => {
                              setPnlAddClickCount(pnlAddClickCount + 1)
                              setPnlNum(pnlNum + 1)
                              exPnlNum += 1
                              setIsPnlAdd(Math.random())
                            }}>新增PNL</Button>
                  </Tooltip>
                  <div
                    style={{display: showPnlWarning ? '' : 'none', color: 'red', marginLeft: '10px'}}>
                    <span>{pnlWarningMsg}</span>
                  </div>
                </Col>
              </Row>
              {
                pnlEl
              }
            </div>
            <div className={'neicengxianlu'}
                 style={{display: targetData.map(item => item.processId).indexOf(8) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">内层线路</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengxianlu_moleixing.label}
                    name={fieldLabels.neicengxianlu_moleixing.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'湿膜'}>湿膜</Radio>
                      <Radio value={'干膜'}>干膜</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengxianlu_width.label}
                    name={fieldLabels.neicengxianlu_width.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.neicengxianlu_width.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengxianlu_distance.label}
                    name={fieldLabels.neicengxianlu_distance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.neicengxianlu_distance.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'neicengkeshi'}
                 style={{display: targetData.map(item => item.processId).indexOf(10) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">内层蚀刻</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengkeshi_minWidth.label}
                    name={fieldLabels.neicengkeshi_minWidth.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.neicengxianlu_width.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengkeshi_distance.label}
                    name={fieldLabels.neicengkeshi_distance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.neicengkeshi_distance.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'neicengjianyan'}
                 style={{display: targetData.map(item => item.processId).indexOf(12) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">内层检验</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.neicengjianyan_jianyanfangshi.label}
                    name={fieldLabels.neicengjianyan_jianyanfangshi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'目检'}>目检</Radio>
                      <Radio value={'AOI'}>AOI</Radio>
                      <Radio value={'电测'}>电测</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'neicengyanghua'}
                 style={{display: targetData.map(item => item.processId).indexOf(14) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">内层氧化</Divider>
              <Row gutter={16}>
                <Col lg={4} md={6} sm={12}>
                  <Form.Item
                    label={fieldLabels.neicengyanghua_yanghuafangshi.label}
                    name={fieldLabels.neicengyanghua_yanghuafangshi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'黑化'}>黑化</Radio>
                      <Radio value={'棕化'}>棕化</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'cengya'}
                 style={{display: targetData.map(item => item.processId).indexOf(16) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">层压</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cengya_thickness.label}
                    name={fieldLabels.cengya_thickness.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.cengya_thickness.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cengya_thicknesswuchazhi.label}
                    name={fieldLabels.cengya_thicknesswuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.cengya_thicknesswuchazhi.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cengya_cuppor.label}
                    name={fieldLabels.cengya_cuppor.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="oz"
                           placeholder={`请输入${fieldLabels.cengya_cuppor.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'bandian'}
                 style={{display: targetData.map(item => item.processId).indexOf(18) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">板电</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.bandian_el.label}
                    name={fieldLabels.bandian_el.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="oz"
                           placeholder={`请输入${fieldLabels.bandian_el.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'waicengzuankong'}
                 style={{display: targetData.map(item => item.processId).indexOf(20) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">外层钻孔</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.waicengzuankong_min.label}
                    name={fieldLabels.waicengzuankong_min.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.waicengzuankong_min.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.waicengzuankong_name.label}
                    name={fieldLabels.waicengzuankong_name.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.waicengzuankong_name.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'yicixiacao'}
                 style={{display: targetData.map(item => item.processId).indexOf(22) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">一次铣槽（孔）</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.yicixiancao_file.label}
                    name={fieldLabels.yicixiancao_file.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.yicixiancao_file.label}`}>
                    </Input>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'chengtongbandian'}
                 style={{display: targetData.map(item => item.processId).indexOf(24) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">沉铜板电</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.chengtongbandian_glue.label}
                    name={fieldLabels.chengtongbandian_glue.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox
                        value={fieldLabels.chengtongbandian_glue.label}>{fieldLabels.chengtongbandian_glue.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'waicengtuxing'}
                 style={{display: targetData.map(item => item.processId).indexOf(26) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">外层图形</Divider>
              <Row gutter={16}>
                <Col lg={4} md={6} sm={12}>
                  <Form.Item
                    label={fieldLabels.waicengtuxing_moleixing.label}
                    name={fieldLabels.waicengtuxing_moleixing.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'湿膜'}>湿膜</Radio>
                      <Radio value={'干膜'}>干膜</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={4} md={6} sm={12}>
                  <Form.Item
                    label={fieldLabels.waicengtuxing_zhouqi.label}
                    name={fieldLabels.waicengtuxing_zhouqi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'年周'}>年周</Radio>
                      <Radio value={'周年'}>周年</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.waicengtuxing_minWidth.label}
                    name={fieldLabels.waicengtuxing_minWidth.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.waicengtuxing_minWidth.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.waicengtuxing_distance.label}
                    name={fieldLabels.waicengtuxing_distance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.waicengtuxing_distance.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'diandu'}
                 style={{display: targetData.map(item => item.processId).indexOf(28) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">图形电镀</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianDu_fangshi.label}
                    name={fieldLabels.dianDu_fangshi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'镀铜'}>镀铜</Radio>
                      <Radio value={'镀锡'}>镀锡</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianDu_area.label}
                    name={fieldLabels.dianDu_area.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.dianDu_area.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="sq.dm"
                           placeholder={`请输入${fieldLabels.dianDu_area.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianDu_hole.label}
                    name={fieldLabels.dianDu_hole.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.dianDu_hole.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="um"
                           placeholder={`请输入${fieldLabels.dianDu_hole.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianDu_Thickness.label}
                    name={fieldLabels.dianDu_Thickness.code}
                    rules={[
                      {
                        required: true,
                        message: `请输入${fieldLabels.dianDu_Thickness.label}`,
                      },
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="oz"
                           placeholder={`请输入${fieldLabels.dianDu_Thickness.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'tuimoshijian'}
                 style={{display: targetData.map(item => item.processId).indexOf(30) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">退膜蚀检</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.tuimoshijian_minWidth.label}
                    name={fieldLabels.tuimoshijian_minWidth.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.tuimoshijian_minWidth.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.tuimoshijian_distance.label}
                    name={fieldLabels.tuimoshijian_distance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="mm"
                           placeholder={`请输入${fieldLabels.tuimoshijian_distance.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item className={'transparent-label'}
                    label={'除钯'}
                    name={fieldLabels.tuimoshijian_chuba.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox
                        value={fieldLabels.tuimoshijian_chuba.label}>{fieldLabels.tuimoshijian_chuba.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'waciengshijian'}
                 style={{display: targetData.map(item => item.processId).indexOf(32) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">外层蚀检</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.waicengshijian_jianceleixing.label}
                    name={fieldLabels.waicengshijian_jianceleixing.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'目检'}>目检</Radio>
                      <Radio value={'AOI'}>AOI</Radio>
                      <Radio value={'电测'}>电测</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'siyinzuhan'}
                 style={{display: targetData.map(item => item.processId).indexOf(34) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">丝印阻焊</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzuhan_color.label}
                    name={fieldLabels.siyinzuhan_color.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.siyinzuhan_color.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzuhan_guokong.label}
                    name={fieldLabels.siyinzuhan_guokong.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}
                                 onChange={(e) => onGuoKongTypeChange(e)}>
                      <Radio value={'塞油'}>塞油</Radio>
                      <Radio value={'盖油'}>盖油</Radio>
                      <Radio value={'开窗'}>开窗</Radio>
                      <Radio value={'其他'}>其他</Radio>
                    </Radio.Group>

                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    style={{display: qitaGuoKongVisible ? '' : 'none'}}
                    label={fieldLabels.siyinzuhan_qitaguokong.label}
                    name={fieldLabels.siyinzuhan_qitaguokong.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.siyinzuhan_qitaguokong.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzuhan_changjia.label}
                    name={fieldLabels.siyinzuhan_changjia.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.siyinzuhan_changjia.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzuhan_zhouqi.label}
                    name={fieldLabels.siyinzuhan_zhouqi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'年周'}>年周</Radio>
                      <Radio value={'周年'}>周年</Radio>
                      <Radio value={'年'}>年</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'siyinzifu'}
                 style={{display: targetData.map(item => item.processId).indexOf(36) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">丝印字符</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzifu_color.label}
                    name={fieldLabels.siyinzifu_color.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.siyinzifu_color.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzifu_yuanjianmian.label}
                    name={fieldLabels.siyinzifu_yuanjianmian.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={'元件面'}>元件面</Checkbox>
                      <Checkbox value={'焊接面'}>焊接面</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzifu_changjia.label}
                    name={fieldLabels.siyinzifu_changjia.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.siyinzifu_changjia.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.siyinzifu_zhouqi.label}
                    name={fieldLabels.siyinzifu_zhouqi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Radio value={'年周'}>年周</Radio>
                      <Radio value={'周年'}>周年</Radio>
                      <Radio value={'年月'}>年月</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'pengxi'}
                 style={{display: targetData.map(item => item.processId).indexOf(38) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">喷锡</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.pengxi_xihou.label}
                    name={fieldLabels.pengxi_xihou.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="um"
                           placeholder={`请输入${fieldLabels.pengxi_xihou.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'chengniejin'}
                 style={{display: targetData.map(item => item.processId).indexOf(40) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">沉镍金</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chenniejin_niehou.label}
                    name={fieldLabels.chenniejin_niehou.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="um"
                           placeholder={`请输入${fieldLabels.chenniejin_niehou.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chenniejin_jinhou.label}
                    name={fieldLabels.chenniejin_jinhou.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3}
                           addonAfter="u"
                           placeholder={`请输入${fieldLabels.chenniejin_jinhou.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'tanyou'}
                 style={{display: targetData.map(item => item.processId).indexOf(42) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">碳油</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.tanyou_tanyou.label}
                    name={fieldLabels.tanyou_tanyou.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.tanyou_tanyou.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'ercizuankong'}
                 style={{display: targetData.map(item => item.processId).indexOf(44) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">二次钻孔</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.ercizuankong_file.label}
                    name={fieldLabels.ercizuankong_file.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.ercizuankong_file.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'chengxing'}
                 style={{display: targetData.map(item => item.processId).indexOf(46) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">成形</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_fangshi.label}
                    name={fieldLabels.chengxing_fangshi.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={'机锣'}>机锣</Checkbox>
                      <Checkbox value={'冲模'}>冲模</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_moju.label}
                    name={fieldLabels.chengxing_moju.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.chengxing_moju.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.chengxing_xiebian.label}
                    name={fieldLabels.chengxing_xiebian.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox
                        value={fieldLabels.chengxing_xiebian.label}>{fieldLabels.chengxing_xiebian.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_jiaodu.label}
                    name={fieldLabels.chengxing_jiaodu.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.chengxing_jiaodu.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_jiaoduwuchazhi.label}
                    name={fieldLabels.chengxing_jiaoduwuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} addonAfter={'mm'} placeholder={`请输入${fieldLabels.chengxing_jiaoduwuchazhi.label}`}/>
                  </Form.Item>
                </Col>

              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_hou.label}
                    name={fieldLabels.chengxing_hou.code}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.chengxing_hou.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing_houwuchazhi.label}
                    name={fieldLabels.chengxing_houwuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.chengxing_houwuchazhi.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'cut'}
                 style={{display: targetData.map(item => item.processId).indexOf(48) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">V-CUT</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cut_fangshi.label}
                    name={fieldLabels.cut_fangshi.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={'电脑V-CUT'}>电脑V-CUT</Checkbox>
                      <Checkbox value={'手工V-CUT'}>手工V-CUT</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cut_jiaodu.label}
                    name={fieldLabels.cut_jiaodu.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.cut_jiaodu.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cut_jiaoduwuchazhi.label}
                    name={fieldLabels.cut_jiaoduwuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.cut_jiaoduwuchazhi.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cut_yuhou.label}
                    name={fieldLabels.cut_yuhou.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.cut_yuhou.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.cut_yuhouwuchazhi.label}
                    name={fieldLabels.cut_yuhouwuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.cut_yuhouwuchazhi.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'test'}
                 style={{display: targetData.map(item => item.processId).indexOf(50) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">测试</Divider>
              <Row gutter={16}>
                <Col lg={2} md={3} sm={6}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.test_feizheng.label}
                    name={fieldLabels.test_feizheng.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={fieldLabels.test_feizheng.label}>{fieldLabels.test_feizheng.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={2} md={3} sm={6}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.test_zhuanyong.label}
                    name={fieldLabels.test_zhuanyong.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={fieldLabels.test_zhuanyong.label}>{fieldLabels.test_zhuanyong.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={2} md={3} sm={6}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.test_tongyong.label}
                    name={fieldLabels.test_tongyong.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={fieldLabels.test_tongyong.label}>{fieldLabels.test_tongyong.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={2} md={3} sm={6}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.test_et.label}
                    name={fieldLabels.test_et.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={fieldLabels.test_et.label}>{fieldLabels.test_et.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.test_huabian.label}
                    name={fieldLabels.test_huabian.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.test_huabian.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.test_bianhao.label}
                    name={fieldLabels.test_bianhao.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.test_bianhao.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'glue'}
                 style={{display: targetData.map(item => item.processId).indexOf(54) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">蓝胶</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.glue_xinghao.label}
                    name={fieldLabels.glue_xinghao.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.glue_xinghao.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.glue_glue.label}
                    name={fieldLabels.glue_glue.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.glue_glue.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'fqa'}
                 style={{display: targetData.map(item => item.processId).indexOf(56) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">FQA</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.fqa_thickness.label}
                    name={fieldLabels.fqa_thickness.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.fqa_thickness.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.fqa_thicknesswuchazhi.label}
                    name={fieldLabels.fqa_thicknesswuchazhi.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.fqa_thicknesswuchazhi.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </div>
            <div className={'baozhuangchuhuo'}
                 style={{display: targetData.map(item => item.processId).indexOf(58) > -1 ? 'block' : 'none'}}>
              <Divider orientation="left">包装出货</Divider>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.baozhuang_baozhuangfangshi.label}
                    name={fieldLabels.baozhuang_baozhuangfangshi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}} onChange={e => onBaoZhuangChange(e)}>
                      <Radio value={'真空'}>真空</Radio>
                      <Radio value={'普通'}>普通</Radio>
                      <Radio value={'其他'}>其他</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    style={{display: qitaBaoZhuangisible ? '' : 'none'}}
                    label={fieldLabels.baozhuang_qitabaozhuang.label}
                    name={fieldLabels.baozhuang_qitabaozhuang.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.baozhuang_qitabaozhuang.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.baozhuang_chuhuofangshi.label}
                    name={fieldLabels.baozhuang_chuhuofangshi.code}
                  >
                    <Radio.Group disabled={formType === 3} style={{width: '100%'}} onChange={e => onChuHuoChange(e)}>
                      <Radio value={'单片'}>单片</Radio>
                      <Radio value={'联片'}>联片</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    style={{display: qitaChuHuoisible ? '' : 'none'}}
                    label={fieldLabels.baozhuang_lianpian.label}
                    name={fieldLabels.baozhuang_lianpian.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType === 3} placeholder={`请输入${fieldLabels.baozhuang_lianpian.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={16}>
                <Col lg={3} md={4} sm={8}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.baozhuang_baogao.label}
                    name={fieldLabels.baozhuang_baogao.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox
                        value={fieldLabels.baozhuang_baogao.label}>{fieldLabels.baozhuang_baogao.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={3} md={4} sm={8}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.baozhuang_qiepian.label}
                    name={fieldLabels.baozhuang_qiepian.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox
                        value={fieldLabels.baozhuang_qiepian.label}>{fieldLabels.baozhuang_qiepian.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={3} md={4} sm={8}>
                  <Form.Item className={'transparent-label'}
                    label={fieldLabels.baozhuang_kehan.label}
                    name={fieldLabels.baozhuang_kehan.code}
                  >
                    <Checkbox.Group disabled={formType === 3} style={{width: '100%'}}>
                      <Checkbox value={fieldLabels.baozhuang_kehan.label}>{fieldLabels.baozhuang_kehan.label}</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
            </div>
          </Card>
        </>
        <FooterToolbar>
          {getErrorInfo(error)}
          <Button type="primary" onClick={() => handleClick(1)} style={{display: formType < 3 ? '' : 'none'}}>
            保存并提交
          </Button>
          <Button type="primary" onClick={() => handleClick(0)} style={{display: formType < 3 ? '' : 'none'}}>
            存为草稿
          </Button>
          <Button onClick={props.onCancel.bind(this, false)}>
            取消
          </Button>
        </FooterToolbar>
      </Form>
    </div>
  );
};

// export default connect(({ loading }) => ({
//   submitting: loading.effects['productForm/submitAdvancedForm'],
// }))(ProductForm);
export default ProductForm;
